#include "EditorTexturePageViewModel.h"
#include "Texture/Texture2D.h"
#include "Asset/EditorDefaultPackage.h"

void REditorTexturePageViewModel::BindModel(TSharedObjectPtr<REditorPageModel> InModel)
{
    Super::BindModel(InModel);
    Model = InModel;

    Icon= REditorDefaultPackage::Get()->GetIcon(U"TextureIcon");
}

TSharedObjectPtr<RTexture2D> REditorTexturePageViewModel::GetIcon() const
{
    return Icon;
}

CString REditorTexturePageViewModel::GetTitle() const
{
    return Model->Texture->GetNodeName();
}

TSharedObjectPtr<RTexture2D> REditorTexturePageViewModel::GetTexture() const
{
    return  Model->Texture;
}
